CLUTTER_ACTOR_CLASS (shell_tray_icon_parent_class)->allocate (actor, box);
+ na_xembed_set_available_size (NA_XEMBED (tray_icon->tray_child),
+ roundf (clutter_actor_box_get_width (box)),
+ roundf (clutter_actor_box_get_height (box)));
+
/* Find the actor's new coordinates in terms of the stage.
*/
clutter_actor_get_transformed_position (actor, &wx, &wy);
int request_height;
int current_width;
int current_height;
+ int available_width;
+ int available_height;
int resize_count;
int xembed_version;
priv->current_width = 0;
priv->current_height = 0;
priv->resize_count = 0;
+ priv->available_width = -1;
+ priv->available_height = -1;
g_clear_handle_id (&priv->resize_id, g_source_remove);
}
width = priv->request_width;
height = priv->request_height;
+ if (priv->available_width >= 0)
+ width = priv->available_width;
+ if (priv->available_height >= 0)
+ height = priv->available_height;
+
XMoveResizeWindow (xdisplay,
priv->socket_window,
x, y,
static void
na_xembed_init (NaXembed *xembed)
{
+ NaXembedPrivate *priv = na_xembed_get_instance_private (xembed);
+
+ priv->available_width = -1;
+ priv->available_height = -1;
}
void
*height = priv->request_height;
}
+void
+na_xembed_set_available_size (NaXembed *xembed,
+ int width,
+ int height)
+{
+ NaXembedPrivate *priv = na_xembed_get_instance_private (xembed);
+
+ if (priv->available_width == width && priv->available_height == height)
+ return;
+
+ priv->available_width = width;
+ priv->available_height = height;
+
+ na_xembed_resize (xembed);
+}
+
void
na_xembed_get_root_position (NaXembed *xembed,
int *x,
int *width,
int *height);
+void na_xembed_set_available_size (NaXembed *xembed,
+ int width,
+ int height);
+
void na_xembed_set_background_color (NaXembed *xembed,
const CoglColor *color);
-G_END_DECLS
\ No newline at end of file
+G_END_DECLS